package com.daotu.psy.common.core.exception;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

/**
 * @author jacky
 * @date 2024-04-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
public class BizException extends RuntimeException {

	private static final long serialVersionUID = -7285211528095468156L;

	private Integer code;

	private Object data;

	public BizException(Integer code, String msg) {
		super(msg);
		this.code = code;
		this.data = null;
	}

	public BizException(Integer code, String msg, Object data) {
		super(msg);
		this.code = code;
		this.data = data;
	}

}
